<template>
    <el-form :model="form" >
      <el-row :gutter="20">
        <el-col :md="5" :sm="6" :xs="24">
          <el-form-item label="类型">
            <el-select v-model="form.type" placeholder="请选择类型">
              <el-option :value="1" label="推荐">推荐</el-option>
              <el-option :value="2" label="破解">破解</el-option>
              <el-option :value="3" label="看片">看片</el-option>
              <el-option :value="4" label="视频">视频</el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :md="5" :sm="6" :xs="24">
          <el-form-item label="状态">
            <el-select v-model="form.status" placeholder="请选择状态">
              <el-option :value="0" label="隐藏">隐藏</el-option>
              <el-option :value="1" label="显示">显示</el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <!-- <el-col :md="5" :sm="6" :xs="24">
          <el-form-item label="底部悬浮">
            <el-select v-model="form.isBottom" placeholder="请选择底部悬浮">
              <el-option :value="0" label="正常">正常</el-option>
              <el-option :value="1" label="悬浮">悬浮</el-option>
            </el-select>
          </el-form-item>
        </el-col> -->
        <el-col :md="5" :sm="6" :xs="24">
          <div class="ele-form-actions">
            <el-button type="primary" @click="search">搜索</el-button>
            <el-button type="info" plain @click="reset">重置</el-button>
          </div>
        </el-col>
      </el-row>
    </el-form>
</template>

<script>
export default {
  name: 'SearchForm',
  data() {
    return {
      form: {
        type: undefined,
        // isBottom: undefined,
        status: undefined,
      }
    };
  },
  methods: {
    search() {
      this.$emit("search", this.form);
    },
    reset() {
      this.form = {
        type: undefined,
        // isBottom: undefined,
        status: undefined,
      };
      this.$emit("search", this.form);
    }
  }
}
</script>

<style scoped>
.form_form {
  margin: 15px;
  padding: 15px;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, .1), -4px -4px 8px rgba(0, 0, 0, .1);
  background-color: white;
}
</style>